package com.gradle.mapper;

import com.gradle.bean.employee.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ldanniel
 */
@Mapper
public interface EmployeeMapper {
    /**
     * 保存员工信息
     * @param employee
     */
    void save(Employee employee);
    /**
     * 保存员工信息
     * @param employee
     */
    void saveTemp(Employee employee);

    /**
     * 查询所有员工信息
     * @return
     */
    List<Employee> queryEmployeeInfo();

    /**
     * 清空表
     */
    void truncateEmployee();
    /**
     * 清空表
     */
    void truncateEmployeeTemp();
    List<Employee> queryTempForList(@Param("startIndex") int startIndex,
                                    @Param("toIndex") int toIndex);
    int countEmployeeTemp();
}
